package com.hxl.tech.gateway.auth.model;

import lombok.Data;
import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 应用授权信息 Model 
 * @author soliddq
 * @date 2023-10-16
 */
@Entity
@Data
public class ApplicationOauth implements Serializable {

    @EmbeddedId
    private ApplicationOauthId id;

    private String scope;

    private String status;

    private LocalDateTime expiresTime;

    private LocalDateTime updateTime;

    @Embeddable
    @Data
    public static class ApplicationOauthId implements Serializable {
        private String merchantCode;
        private String appId;

        public ApplicationOauthId() {
        }

        public ApplicationOauthId(String merchantCode,String appId) {
            this.merchantCode = merchantCode;
            this.appId = appId;
        }
    }

}
